{include file="pub:header" /}
<script type="text/javascript" src="/static/plugin/viewer/viewer.min.js"></script>
<link rel="stylesheet" type="text/css" href="/static/plugin/viewer/viewer.min.css" />
<script>
$(function(){
    $('#formpost').viewer();
})
</script>
</header>
<body>

<div class="pad_lr_10">

	<div class="col_tab" style="margin-top:20px;">

        <div class="explain_col" style="margin-bottom:5px;display:none;">
           配置管理
        </div>

		<ul class="J_tabs tab_but cu_li">
		    {volist name="type" id="group"}
	            <li {eq name="key" value="$id"}class="current"{/eq}><a href="{:url('?id='.$key)}">{$group}配置</a></li>
			{/volist}
		</ul>

		<div class="J_panes">
			<div class="content_list pad_10">

			    <form action="{:url('save')}" method="post" id="formpost">
				<table width="100%" cellspacing="0" class="table_form">

		    	{volist name="list" id="config"}

			        <tr>
			          <th>{$config.title}：</th>
			          <td>
							{switch config.type}
							{case 0|1}
							<input type="text" name="config[{$config.name}]" value="{$config.value}" class="input-text" size="50" >
							{/case}
							{case 2|3}
								<p><textarea name="config[{$config.name}]" rows="7" cols="70" class="input_textarea">{$config.value}</textarea></p>
							{/case}
							{case value="4"}
							<select name="config[{$config.name}]" class='select' style="width:160px;">
								{volist name=":parse_config_attr($config['extra'])" id="vo"}
									<option value="{$key}" {eq name="config.value" value="$key"}selected{/eq}>{$vo}</option>
								{/volist}
                            </select>
							{/case}
							{case value="5"}
							    <div style="margin-bottom:5px;">
							       <input type="hidden" name="config[{$config.name}]" id="{$config.name}" value="{$config.value}">
							       {notempty name="config.value"}
							       <img src="{$config.value}" id="{$config.name}_preview" style="cursor:hand;max-width:200px;">
							       {else/}
							       <img src="/static/common/attach/images/upload-pic.png" id="{$config.name}_preview" style="cursor:hand;max-width:200px;">
							       {/notempty}
							       <a href="javascript:;" onclick="removeImg('{$config.name}');">移除</a>
							    </div>
								<input type="button" onclick="javascript:flashupload(0,'图片上传',1,'{:config(\'UPLOAD_PIC\')}',{:config('UPLOAD_PIC_MAXSIZE')},'{$config.name}',thumb_images)" class="btn" value="上传封面图片">
				                <span style="color:red;"></span>
							{/case}
						  {case value="6"}
							  <input type="text" name="config[{$config.name}]" value="{$config.value}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="input-text Wdate" size="20">
						  {/case}
							{/switch}
			            <span class="gray ml10">【{$config.name}】 {$config.remark}</span>
			          </td>
			        </tr>
				{/volist}
				<tr>
				   <th>&nbsp;</th>
				   <td>
				   	  <input type="button" value="确定" onclick="ajaxpost('formpost')" name="dosubmit" class="smt mr10">
				      <input class="smt" type="reset" name="Input" value="重置" />
				   </td>
				</tr>
				</table>
				</form>

			</div>
        </div>

	</div>
</div>

{include file="pub:footer" /}
